<template>
    <div>
        <div v-for="(item, idx) in list" :key="idx">
            <img :src="item.img" alt="">
            <div>
                <h1>{{item.title}}</h1>
            </div>
        </div>
    </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { getList } from '@/api/index.ts'

@Component
export default class Main extends Vue {
    private list:any[] = []

    created() {
        getList().then(res => {
            this.list = res.data
        })
    }
}
</script>